//
//  LiveNewsCell.m
//  ios_news
//
//  Created by Han on 14-7-7.
//  Copyright (c) 2014年 ucoder. All rights reserved.
//

#import "ActivityCell.h"
#import "SDWebImageManager.h"
#import "UIImageView+WebCache.h"

@implementation ActivityCell
@synthesize imageView = _imageView;


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        _imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 120)];
        [_imageView setContentMode:UIViewContentModeScaleAspectFill];
        _imageView.layer.masksToBounds = YES;
        [self.contentView addSubview:_imageView];
        

    }
    return self;
}

- (void)setAct:(Activity *)act {
    
    [_imageView sd_setImageWithURL:[NSURL URLWithString:act.imgUrl]
                placeholderImage:[UIImage imageNamed:@"more_gallery_holder"]];
    
}



@end
